package com.cntcdt.api.db.model.base;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.Date;

/**
 * 这是cdt_update_log_details的数据传输对象基类,直接与表对应<br>
 */
public abstract class UpdateLogDetailsModelBase  implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 属性:id<br>
     */
    private Integer id = 0;
    /**
     * 属性:terminal<br>
     */
    private String terminal = "";
    /**
     * 属性:hardware<br>
     */
    private String hardware = "";
    /**
     * 属性:updateTime<br>
     */
    private Date updateTime = new Date();
    /**
     * 属性:addTime<br>
     */
    private Date addTime = new Date();
    /**
     * 属性:updateVersion<br>
     */
    private String updateVersion = "";
    /**
     * 属性:0无任务1升级中2升级失败<br>
     * 含义:0无任务1升级中2升级失败<br>
     */
    private Integer updateType = 0;
    /**
     * 属性:statusCode<br>
     */
    private String statusCode = "";
    /**
     * 属性:logId<br>
     */
    private Integer logId = 0;
    /**
     * 属性：software
     */
    private Integer software = 0;
    /**
     * 属性：errLog
     */
    private String errLog = "";

    /**
     *  默认构造方法,构造一个默认的UpdateLogDetailsModelBase对象
     */
    public UpdateLogDetailsModelBase(){
    }

    /**
     *  构造函数
     *  @param rs 数据库查询结果集
     */
    public UpdateLogDetailsModelBase(ResultSet rs){
           try{
               this.id = rs.getInt("id");
               this.terminal = rs.getString("terminal");
               this.hardware = rs.getString("hardware");
               this.updateTime = rs.getDate("updateTime");
               this.addTime = rs.getDate("addTime");
               this.updateVersion = rs.getString("updateVersion");
               this.updateType = rs.getInt("updateType");
               this.statusCode = rs.getString("statusCode");
               this.logId = rs.getInt("logId");
               this.software = rs.getInt("software");
               this.errLog = rs.getString("errLog");
           }catch(Exception e) {
              e.printStackTrace(); 
           }
    }


    
    public Integer getSoftware() {
		return software;
	}

	public void setSoftware(Integer software) {
		this.software = software;
	}

	public String getErrLog() {
		return errLog;
	}

	public void setErrLog(String errLog) {
		this.errLog = errLog;
	}

	/**
     * 设置属性id<br>
     * @param id 待设置的属性id的值
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取属性id<br>
     * @return 属性id的值
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置属性terminal<br>
     * @param terminal 待设置的属性terminal的值
     */
    public void setTerminal(String terminal) {
        this.terminal = terminal;
    }

    /**
     * 获取属性terminal<br>
     * @return 属性terminal的值
     */
    public String getTerminal() {
        return terminal;
    }

    /**
     * 设置属性hardware<br>
     * @param hardware 待设置的属性hardware的值
     */
    public void setHardware(String hardware) {
        this.hardware = hardware;
    }

    /**
     * 获取属性hardware<br>
     * @return 属性hardware的值
     */
    public String getHardware() {
        return hardware;
    }

    /**
     * 设置属性updateTime<br>
     * @param updateTime 待设置的属性updateTime的值
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取属性updateTime<br>
     * @return 属性updateTime的值
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置属性addTime<br>
     * @param addTime 待设置的属性addTime的值
     */
    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    /**
     * 获取属性addTime<br>
     * @return 属性addTime的值
     */
    public Date getAddTime() {
        return addTime;
    }

    /**
     * 设置属性updateVersion<br>
     * @param updateVersion 待设置的属性updateVersion的值
     */
    public void setUpdateVersion(String updateVersion) {
        this.updateVersion = updateVersion;
    }

    /**
     * 获取属性updateVersion<br>
     * @return 属性updateVersion的值
     */
    public String getUpdateVersion() {
        return updateVersion;
    }

    /**
     * 设置属性0无任务1升级中2升级失败<br>
     * 含义:0无任务1升级中2升级失败<br>
     * @param updateType 待设置的属性0无任务1升级中2升级失败的值
     */
    public void setUpdateType(Integer updateType) {
        this.updateType = updateType;
    }

    /**
     * 获取属性0无任务1升级中2升级失败<br>
     * 含义:0无任务1升级中2升级失败<br>
     * @return 属性0无任务1升级中2升级失败的值
     */
    public Integer getUpdateType() {
        return updateType;
    }

    /**
     * 设置属性statusCode<br>
     * @param statusCode 待设置的属性statusCode的值
     */
    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }

    /**
     * 获取属性statusCode<br>
     * @return 属性statusCode的值
     */
    public String getStatusCode() {
        return statusCode;
    }

    /**
     * 设置属性logId<br>
     * @param logId 待设置的属性logId的值
     */
    public void setLogId(Integer logId) {
        this.logId = logId;
    }

    /**
     * 获取属性logId<br>
     * @return 属性logId的值
     */
    public Integer getLogId() {
        return logId;
    }


    /**
     * 比较两个对象在逻辑上是否相等
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof UpdateLogDetailsModelBase)) {
            return false;
        }

        final UpdateLogDetailsModelBase otherModel = (UpdateLogDetailsModelBase) other;
        if (getId()!=null && !getId().equals(otherModel.getId())) {
            return false;
        }
        return true;
    }

    /**
     * 根据主键生成HashCode
     * @see java.lang.Object#hashCode()
     */
    public int hashCode() {
        StringBuffer buffer = new StringBuffer();
        buffer.append('|').append(id);
        return buffer.toString().hashCode();
    }
}
